package com.marvels.approve.credit.consum.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSONObject;
import com.marvels.approve.credit.consum.ConsumerExternalIntBankApi;
import com.marvels.approve.credit.dto.IntBankBanruDetailDTO;
import com.marvels.approve.credit.dto.IntBankBasiInfoCollectionDTO;
import com.marvels.approve.credit.dto.IntBankBasicDTO;
import com.marvels.approve.credit.dto.IntBankCreditCardDTO;
import com.marvels.approve.credit.dto.IntBankCreditPaymentRecordsDTO;
import com.marvels.approve.credit.dto.IntBankCredittipsDTO;
import com.marvels.approve.credit.dto.IntBankDwellmessageDTO;
import com.marvels.approve.credit.dto.IntBankEndowmentInsuranceDTO;
import com.marvels.approve.credit.dto.IntBankGuaranteeCountDTO;
import com.marvels.approve.credit.dto.IntBankLogDTO;
import com.marvels.approve.credit.dto.IntBankNotCredittipsDTO;
import com.marvels.approve.credit.dto.IntBankNotPinshouseholdsDTO;
import com.marvels.approve.credit.dto.IntBankNotQuasiCreditDTO;
import com.marvels.approve.credit.dto.IntBankPositionmesageDTO;
import com.marvels.approve.credit.dto.IntBankQueryDetailDTO;
import com.marvels.approve.credit.dto.IntBankQuerySummaryDTO;
import com.marvels.approve.credit.dto.IntBankStandardCreditCardDTO;
import com.marvels.approve.credit.dto.IntDataQueryLogDTO;
import com.marvels.common.dto.MarvelsResultDTO;
import com.marvels.common.utils.MarvelsLogUtil;
import com.marvels.dubbo.externalservice.service.IntBankDataService;

import cn.hutool.core.bean.BeanUtil;

@Component
public class ConsumerExternalIntBankApiImpl implements ConsumerExternalIntBankApi {

	@Autowired
	private IntBankDataService intBankDataService;
	
	@Override
	public List<Map<String, Object>> detailsOfLoanInformation(Map<String, String> map) {
		try {
			List<Map<String, Object>> result = intBankDataService.detailsOfLoanInformation(map);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.detailsOfLoanInformation direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.detailsOfLoanInformation error", e);
			return null;
		}
	}

	@Override
	public Map<String, Object> viewRiskInfoPositionData(Map<String, String> map) {
		try {
			Map<String, Object> result = intBankDataService.viewRiskInfoPositionData(map);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.viewRiskInfoPositionData direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.viewRiskInfoPositionData error", e);
			return null;
		}
	}


	@Override
	public Map<String, Object> intBankCreditPaymentRecords(Map<String, String> map) {
		try {
			Map<String, Object> result = intBankDataService.intBankCreditPaymentRecords(map);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.viewRiskInfoPositionData direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.viewRiskInfoPositionData error", e);
			return null;
		}
	}

	@Override
	public Map<String, Object> intBankCreditCard(Map<String, String> map) {
		try {
			Map<String, Object> result = intBankDataService.intBankCreditCard(map);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankCreditCard direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankCreditCard error", e);
			return null;
		}
	}

	@Override
	public List<IntBankStandardCreditCardDTO> intBankStandardCreditCard(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankStandardCreditCard> apiResult = intBankDataService.intBankStandardCreditCard(map);
			List<IntBankStandardCreditCardDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankStandardCreditCardDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankStandardCreditCard direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankStandardCreditCard error", e);
			return null;
		}
	}

	@Override
	public List<IntBankEndowmentInsuranceDTO> intBankEndowmentInsurance(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankEndowmentInsurance> apiResult = intBankDataService.intBankEndowmentInsurance(map);
			List<IntBankEndowmentInsuranceDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankEndowmentInsuranceDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankEndowmentInsurance direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankEndowmentInsurance error", e);
			return null;
		}
	}

	@Override
	public Map<String, Object> summaryInformationData(Map<String, String> map) {
		try {
			Map<String, Object> result = intBankDataService.summaryInformationData(map);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.summaryInformationData direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.summaryInformationData error", e);
			return null;
		}
	}

	@Override
	public List<IntBankGuaranteeCountDTO> intBankGuaranteeCount(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankGuaranteeCount> apiResult = intBankDataService.intBankGuaranteeCount(map);
			List<IntBankGuaranteeCountDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankGuaranteeCountDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankGuaranteeCount direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankGuaranteeCount error", e);
			return null;
		}
	}

	@Override
	public int saveIntBankStandardCreditCard(IntBankStandardCreditCardDTO intBankStandardCreditCard) {
		try {
			com.fintech.third.model.intbank.IntBankStandardCreditCard param = new com.fintech.third.model.intbank.IntBankStandardCreditCard();
			BeanUtil.copyProperties(intBankStandardCreditCard, param);
			int result = intBankDataService.saveIntBankStandardCreditCard(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankStandardCreditCard direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankStandardCreditCard error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankEndowmentInsurance(IntBankEndowmentInsuranceDTO intBankEndowmentInsurance) {
		try {
			com.fintech.third.model.intbank.IntBankEndowmentInsurance param = new com.fintech.third.model.intbank.IntBankEndowmentInsurance();
			BeanUtil.copyProperties(intBankEndowmentInsurance, param);
			int result = intBankDataService.saveIntBankEndowmentInsurance(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankEndowmentInsurance direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankEndowmentInsurance error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankEndowmentInsurance(IntBankEndowmentInsuranceDTO intBankEndowmentInsurance) {
		try {
			com.fintech.third.model.intbank.IntBankEndowmentInsurance param = new com.fintech.third.model.intbank.IntBankEndowmentInsurance();
			BeanUtil.copyProperties(intBankEndowmentInsurance, param);
			int result = intBankDataService.updateIntBankEndowmentInsurance(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankEndowmentInsurance direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankEndowmentInsurance error", e);
			return 0;
		}
	}


	@Override
	public int updateIntBankNotQuasiCredit(IntBankNotQuasiCreditDTO intBankNotQuasiCredit) {
		try {
			com.fintech.third.model.intbank.IntBankNotQuasiCredit param = new com.fintech.third.model.intbank.IntBankNotQuasiCredit();
			BeanUtil.copyProperties(intBankNotQuasiCredit, param);
			int result = intBankDataService.updateIntBankNotQuasiCredit(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankNotQuasiCredit direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankNotQuasiCredit error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankNotCredittips(IntBankNotCredittipsDTO intBankNotCredittips) {
		try {
			com.fintech.third.model.intbank.IntBankNotCredittips param = new com.fintech.third.model.intbank.IntBankNotCredittips();
			BeanUtil.copyProperties(intBankNotCredittips, param);
			int result = intBankDataService.updateIntBankNotCredittips(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankNotCredittips direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankNotCredittips error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankNotCredittips(IntBankNotCredittipsDTO intBankNotCredittips) {
		try {
			com.fintech.third.model.intbank.IntBankNotCredittips param = new com.fintech.third.model.intbank.IntBankNotCredittips();
			BeanUtil.copyProperties(intBankNotCredittips, param);
			int result = intBankDataService.saveIntBankNotCredittips(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankNotCredittips direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankNotCredittips error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankGuaranteeCount(IntBankGuaranteeCountDTO intBankGuaranteeCount) {
		try {
			com.fintech.third.model.intbank.IntBankGuaranteeCount param = new com.fintech.third.model.intbank.IntBankGuaranteeCount();
			BeanUtil.copyProperties(intBankGuaranteeCount, param);
			int result = intBankDataService.updateIntBankGuaranteeCount(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankGuaranteeCount direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankGuaranteeCount error", e);
			return 0;
		}
	}


	@Override
	public int updateIntBankNotPinshouseholds(IntBankNotPinshouseholdsDTO intBankNotPinshouseholds) {
		try {
			com.fintech.third.model.intbank.IntBankNotPinshouseholds param = new com.fintech.third.model.intbank.IntBankNotPinshouseholds();
			BeanUtil.copyProperties(intBankNotPinshouseholds, param);
			int result = intBankDataService.updateIntBankNotPinshouseholds(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankNotPinshouseholds direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankNotPinshouseholds error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankNotPinshouseholds(IntBankNotPinshouseholdsDTO intBankNotPinshouseholds) {
		try {
			com.fintech.third.model.intbank.IntBankNotPinshouseholds param = new com.fintech.third.model.intbank.IntBankNotPinshouseholds();
			BeanUtil.copyProperties(intBankNotPinshouseholds, param);
			int result = intBankDataService.saveIntBankNotPinshouseholds(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankNotPinshouseholds direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankNotPinshouseholds error", e);
			return 0;
		}
	}


	@Override
	public List<IntBankCreditCardDTO> intBankCreditCardLoanId(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankCreditCard> apiResult = intBankDataService.intBankCreditCardLoanId(map);
			List<IntBankCreditCardDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankCreditCardDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankCreditCardLoanId direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankCreditCardLoanId error", e);
			return null;
		}
	}

	@Override
	public int updateIntBankCreditCard(IntBankCreditCardDTO intBankCreditCard) {
		try {
			com.fintech.third.model.intbank.IntBankCreditCard param = new com.fintech.third.model.intbank.IntBankCreditCard();
			BeanUtil.copyProperties(intBankCreditCard, param);
			int result = intBankDataService.updateIntBankCreditCard(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankCreditCard direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankCreditCard error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankCreditCard(IntBankCreditCardDTO intBankCreditCard) {
		try {
			com.fintech.third.model.intbank.IntBankCreditCard param = new com.fintech.third.model.intbank.IntBankCreditCard();
			BeanUtil.copyProperties(intBankCreditCard, param);
			int result = intBankDataService.saveIntBankCreditCard(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankCreditCard direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankCreditCard error", e);
			return 0;
		}
	}

	@Override
	public Map<String, Object> addQueryDetailPositionData(Map<String, String> map) {
		try {
			Map<String, Object> result = intBankDataService.addQueryDetailPositionData(map);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.addQueryDetailPositionData direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.addQueryDetailPositionData error", e);
			return null;
		}
	}

	@Override
	public int saveIntBankBanruDetail(IntBankBanruDetailDTO intBankBanruDetail) {
		try {
			com.fintech.third.model.intbank.IntBankBanruDetail param = new com.fintech.third.model.intbank.IntBankBanruDetail();
			BeanUtil.copyProperties(intBankBanruDetail, param);
			int result = intBankDataService.saveIntBankBanruDetail(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankBanruDetail direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankBanruDetail error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankBanruDetail(IntBankBanruDetailDTO intBankBanruDetail) {
		try {
			com.fintech.third.model.intbank.IntBankBanruDetail param = new com.fintech.third.model.intbank.IntBankBanruDetail();
			BeanUtil.copyProperties(intBankBanruDetail, param);
			int result = intBankDataService.updateIntBankBanruDetail(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankBanruDetail direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankBanruDetail error", e);
			return 0;
		}
	}

	@Override
	public List<IntBankBanruDetailDTO> intBankBanruDetail(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankBanruDetail> apiResult =  intBankDataService.intBankBanruDetail(map);
			List<IntBankBanruDetailDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankBanruDetailDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankBanruDetail direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankBanruDetail error", e);
			return null;
		}
	}

	@Override
	public int deleteIntBankQuerySummary(long id) {
		try {
			int result = intBankDataService.deleteIntBankQuerySummary(id);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.deleteIntBankQuerySummary direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.deleteIntBankQuerySummary error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankQuerySummary(IntBankQuerySummaryDTO intBankQuerySummary) {
		try {
			com.fintech.third.model.intbank.IntBankQuerySummary param = new com.fintech.third.model.intbank.IntBankQuerySummary();
			BeanUtil.copyProperties(intBankQuerySummary, param);
			int result = intBankDataService.saveIntBankQuerySummary(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankQuerySummary direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankQuerySummary error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankQuerySummary(IntBankQuerySummaryDTO intBankQuerySummary) {
		try {
			com.fintech.third.model.intbank.IntBankQuerySummary param = new com.fintech.third.model.intbank.IntBankQuerySummary();
			BeanUtil.copyProperties(intBankQuerySummary, param);
			int result = intBankDataService.updateIntBankQuerySummary(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankQuerySummary direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankQuerySummary error", e);
			return 0;
		}
	}

	@Override
	public int deleteIntBankBanruDetail(long id) {
		try {
			int result = intBankDataService.deleteIntBankBanruDetail(id);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.deleteIntBankBanruDetail direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.deleteIntBankBanruDetail error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankBasic(IntBankBasicDTO intBankBasic) {
		try {
			com.fintech.third.model.intbank.IntBankBasic param = new com.fintech.third.model.intbank.IntBankBasic();
			BeanUtil.copyProperties(intBankBasic, param);
			int result = intBankDataService.saveIntBankBasic(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankBasic direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankBasic error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankBasic(IntBankBasicDTO intBankBasic) {
		try {
			com.fintech.third.model.intbank.IntBankBasic param = new com.fintech.third.model.intbank.IntBankBasic();
			BeanUtil.copyProperties(intBankBasic, param);
			int result = intBankDataService.updateIntBankBasic(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankBasic direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankBasic error", e);
			return 0;
		}
	}

	@Override
	public List<IntBankBasicDTO> intBankBasic(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankBasic> apiResult = intBankDataService.intBankBasic(map);
			List<IntBankBasicDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankBasicDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankBasic direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankBasic error", e);
			return null;
		}
	}

	@Override
	public int saveIntBankCredittips(IntBankCredittipsDTO intBankCredittips) {
		try {
			com.fintech.third.model.intbank.IntBankCredittips param = new com.fintech.third.model.intbank.IntBankCredittips();
			BeanUtil.copyProperties(intBankCredittips, param);
			int result = intBankDataService.saveIntBankCredittips(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankCredittips direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankCredittips error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankCredittips(IntBankCredittipsDTO intBankCredittips) {
		try {
			com.fintech.third.model.intbank.IntBankCredittips param = new com.fintech.third.model.intbank.IntBankCredittips();
			BeanUtil.copyProperties(intBankCredittips, param);
			int result = intBankDataService.updateIntBankCredittips(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankCredittips direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankCredittips error", e);
			return 0;
		}
	}

	@Override
	public List<IntBankCredittipsDTO> intBankCredittips(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankCredittips> apiResult = intBankDataService.intBankCredittips(map);
			List<IntBankCredittipsDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankCredittipsDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankCredittips direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankCredittips error", e);
			return null;
		}
	}

	@Override
	public int saveIntBankPositionmesage(IntBankPositionmesageDTO intBankPositionmesage) {
		try {
			com.fintech.third.model.intbank.IntBankPositionmesage param = new com.fintech.third.model.intbank.IntBankPositionmesage();
			BeanUtil.copyProperties(intBankPositionmesage, param);
			int result = intBankDataService.saveIntBankPositionmesage(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankPositionmesage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankPositionmesage error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankQueryDetail(IntBankQueryDetailDTO intBankQueryDetail) {
		try {
			com.fintech.third.model.intbank.IntBankQueryDetail param = new com.fintech.third.model.intbank.IntBankQueryDetail();
			BeanUtil.copyProperties(intBankQueryDetail, param);
			int result = intBankDataService.updateIntBankQueryDetail(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankQueryDetail direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankQueryDetail error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankPositionmesage(IntBankPositionmesageDTO intBankPositionmesage) {
		try {
			com.fintech.third.model.intbank.IntBankPositionmesage param = new com.fintech.third.model.intbank.IntBankPositionmesage();
			BeanUtil.copyProperties(intBankPositionmesage, param);
			int result = intBankDataService.updateIntBankPositionmesage(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankPositionmesage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankPositionmesage error", e);
			return 0;
		}
	}

	@Override
	public List<IntBankPositionmesageDTO> intBankPositionmesage(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankPositionmesage> apiResult = intBankDataService.intBankPositionmesage(map);
			List<IntBankPositionmesageDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankPositionmesageDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankPositionmesage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankPositionmesage error", e);
			return null;
		}
	}

	@Override
	public int updateIntBankStandardCreditCard(IntBankStandardCreditCardDTO intBankStandardCreditCard) {
		try {
			com.fintech.third.model.intbank.IntBankStandardCreditCard param = new com.fintech.third.model.intbank.IntBankStandardCreditCard();
			BeanUtil.copyProperties(intBankStandardCreditCard, param);
			int result = intBankDataService.updateIntBankStandardCreditCard(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankStandardCreditCard direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankStandardCreditCard error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankDwellmessage(IntBankDwellmessageDTO intBankDwellmessage) {
		try {
			com.fintech.third.model.intbank.IntBankDwellmessage param = new com.fintech.third.model.intbank.IntBankDwellmessage();
			BeanUtil.copyProperties(intBankDwellmessage, param);
			int result = intBankDataService.saveIntBankDwellmessage(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankDwellmessage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankDwellmessage error", e);
			return 0;
		}
	}

	@Override
	public int updateIntBankDwellmessage(IntBankDwellmessageDTO intBankDwellmessage) {
		try {
			com.fintech.third.model.intbank.IntBankDwellmessage param = new com.fintech.third.model.intbank.IntBankDwellmessage();
			BeanUtil.copyProperties(intBankDwellmessage, param);
			int result = intBankDataService.updateIntBankDwellmessage(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankDwellmessage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankDwellmessage error", e);
			return 0;
		}
	}

	@Override
	public List<IntBankDwellmessageDTO> intBankDwellmessage(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankDwellmessage> apiResult = intBankDataService.intBankDwellmessage(map);
			List<IntBankDwellmessageDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankDwellmessageDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankDwellmessage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankDwellmessage error", e);
			return null;
		}
	}

	@Override
	public int insertIntBankLog(IntBankLogDTO intBankLog) {
		try {
			com.fintech.third.model.intbank.IntBankLog param = new com.fintech.third.model.intbank.IntBankLog();
			BeanUtil.copyProperties(intBankLog, param);
			int result = intBankDataService.insertIntBankLog(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.insertIntBankLog direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.insertIntBankLog error", e);
			return 0;
		}
	}

	@Override
	public int saveIntBankQueryDetail(IntBankQueryDetailDTO intBankQueryDetail) {
		try {
			com.fintech.third.model.intbank.IntBankQueryDetail param = new com.fintech.third.model.intbank.IntBankQueryDetail();
			BeanUtil.copyProperties(intBankQueryDetail, param);
			int result = intBankDataService.saveIntBankQueryDetail(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveIntBankQueryDetail direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveIntBankQueryDetail error", e);
			return 0;
		}
	}

	@Override
	public int deleteIntBankQueryDetail(long id) {
		try {
			int result = intBankDataService.deleteIntBankQueryDetail(id);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.deleteIntBankQueryDetail direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.deleteIntBankQueryDetail error", e);
			return 0;
		}
	}

	@Override
	public List<IntBankQuerySummaryDTO> intBankQuerySummary(Map<String, String> map) {
		try {
			List<com.fintech.third.model.intbank.IntBankQuerySummary> apiResult = intBankDataService.intBankQuerySummary(map);
			List<IntBankQuerySummaryDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankQuerySummaryDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intBankQuerySummary direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intBankQuerySummary error", e);
			return null;
		}
	}

	@Override
	public int updateIntBankCreditPaymentRecords(IntBankCreditPaymentRecordsDTO intBankCreditPaymentRecords) {
		try {
			com.fintech.third.model.intbank.IntBankCreditPaymentRecords param = new com.fintech.third.model.intbank.IntBankCreditPaymentRecords();
			BeanUtil.copyProperties(intBankCreditPaymentRecords, param);
			int result = intBankDataService.updateIntBankCreditPaymentRecords(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.updateIntBankCreditPaymentRecords direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.updateIntBankCreditPaymentRecords error", e);
			return 0;
		}
	}

	@Override
	public List<Map<String, Object>> selectAll(Map<String, String> msg) {
		try {
			List<Map<String, Object>> result = intBankDataService.selectAll(msg);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.selectAll direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.selectAll error", e);
			return null;
		}
	}

	//@Override
	//public List<Map<String, Object>> selectByloanIdAndSerialNum(String loanId, String serialNum) {
	//	MarvelsLogUtil.getInstance().info("hello,selectByloanIdAndSerialNum  this messge send failed by hystrix fall back");
	//	return null;
	//}

	@Override
	public int insertDataLog(IntDataQueryLogDTO IntDataQueryLog) {
		try {
			com.fintech.third.model.intlog.IntDataQueryLog param = new com.fintech.third.model.intlog.IntDataQueryLog();
			BeanUtil.copyProperties(IntDataQueryLog, param);
			int resilt = intBankDataService.insertDataLog(param);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.insertDataLog direct call success!");
			return resilt;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.insertDataLog error", e);
			return 0;
		}
	}

	@Override
	public List<IntDataQueryLogDTO> intDataQueryLogLoanId(Map<String, String> msg) {
		try {
			List<com.fintech.third.model.intlog.IntDataQueryLog> apiResult = intBankDataService.intDataQueryLogLoanId(msg);
			List<IntDataQueryLogDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntDataQueryLogDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.intDataQueryLogLoanId direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.intDataQueryLogLoanId error", e);
			return null;
		}
	}

	@Override
	public IntBankBasicDTO saveMarvelsIntBankBasic(IntBankBasicDTO intBankBasic) {
		try {
			com.fintech.third.model.intbank.IntBankBasic param = new com.fintech.third.model.intbank.IntBankBasic();
			BeanUtil.copyProperties(intBankBasic, param);
			com.fintech.third.model.intbank.IntBankBasic apiResult = intBankDataService.saveMarvelsIntBankBasic(param);
			IntBankBasicDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankBasicDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankBasic direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankBasic error", e);
			return null;
		}
	}

	@Override
	public IntBankDwellmessageDTO saveMarvelsIntBankDwellmessage(IntBankDwellmessageDTO intBankDwellmessage) {
		try {
			com.fintech.third.model.intbank.IntBankDwellmessage param = new com.fintech.third.model.intbank.IntBankDwellmessage();
			BeanUtil.copyProperties(intBankDwellmessage, param);
			com.fintech.third.model.intbank.IntBankDwellmessage apiResult = intBankDataService.saveMarvelsIntBankDwellmessage(param);
			IntBankDwellmessageDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankDwellmessageDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankDwellmessage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankDwellmessage error", e);
			return null;
		}
	}

	@Override
	public IntBankPositionmesageDTO saveMarvelsIntBankPositionmesage(IntBankPositionmesageDTO intBankPositionmesage) {
		try {
			com.fintech.third.model.intbank.IntBankPositionmesage param = new com.fintech.third.model.intbank.IntBankPositionmesage();
			BeanUtil.copyProperties(intBankPositionmesage, param);
			com.fintech.third.model.intbank.IntBankPositionmesage apiResult = intBankDataService.saveMarvelsIntBankPositionmesage(param);
			IntBankPositionmesageDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankPositionmesageDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankPositionmesage direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankPositionmesage error", e);
			return null;
		}
	}

	@Override
	public IntBankCredittipsDTO saveMarvelsIntBankCredittips(IntBankCredittipsDTO intBankCredittips) {
		try {
			com.fintech.third.model.intbank.IntBankCredittips param = new com.fintech.third.model.intbank.IntBankCredittips();
			BeanUtil.copyProperties(intBankCredittips, param);
			com.fintech.third.model.intbank.IntBankCredittips apiResult = intBankDataService.saveMarvelsIntBankCredittips(param);
			IntBankCredittipsDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankCredittipsDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankCredittips direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankCredittips error", e);
			return null;
		}
	}

	@Override
	public IntBankNotCredittipsDTO saveMarvelsIntBankNotCredittips(IntBankNotCredittipsDTO intBankNotCredittips) {
		try {
			com.fintech.third.model.intbank.IntBankNotCredittips param = new com.fintech.third.model.intbank.IntBankNotCredittips();
			BeanUtil.copyProperties(intBankNotCredittips, param);
			com.fintech.third.model.intbank.IntBankNotCredittips apiResult = intBankDataService.saveMarvelsIntBankNotCredittips(param);
			IntBankNotCredittipsDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankNotCredittipsDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankNotCredittips direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankNotCredittips error", e);
			return null;
		}
	}

	@Override
	public IntBankNotPinshouseholdsDTO saveMarvelsIntBankNotPinshouseholds(
			IntBankNotPinshouseholdsDTO intBankNotPinshouseholds) {
		try {
			com.fintech.third.model.intbank.IntBankNotPinshouseholds param = new com.fintech.third.model.intbank.IntBankNotPinshouseholds();
			BeanUtil.copyProperties(intBankNotPinshouseholds, param);
			com.fintech.third.model.intbank.IntBankNotPinshouseholds apiResult = intBankDataService.saveMarvelsIntBankNotPinshouseholds(param);
			IntBankNotPinshouseholdsDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankNotPinshouseholdsDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankNotPinshouseholds direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankNotPinshouseholds error", e);
			return null;
		}
	}

	@Override
	public IntBankNotQuasiCreditDTO saveMarvelsIntBankNotQuasiCredit(IntBankNotQuasiCreditDTO intBankNotQuasiCredit) {
		try {
			com.fintech.third.model.intbank.IntBankNotQuasiCredit param = new com.fintech.third.model.intbank.IntBankNotQuasiCredit();
			BeanUtil.copyProperties(intBankNotQuasiCredit, param);
			com.fintech.third.model.intbank.IntBankNotQuasiCredit apiResult = intBankDataService.saveMarvelsIntBankNotQuasiCredit(param);
			IntBankNotQuasiCreditDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankNotQuasiCreditDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankNotQuasiCredit direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankNotQuasiCredit error", e);
			return null;
		}
	}

	@Override
	public IntBankGuaranteeCountDTO saveMarvelsIntBankGuaranteeCount(IntBankGuaranteeCountDTO intBankGuaranteeCount) {
		try {
			com.fintech.third.model.intbank.IntBankGuaranteeCount param = new com.fintech.third.model.intbank.IntBankGuaranteeCount();
			BeanUtil.copyProperties(intBankGuaranteeCount, param);
			com.fintech.third.model.intbank.IntBankGuaranteeCount apiResult = intBankDataService.saveMarvelsIntBankGuaranteeCount(param);
			IntBankGuaranteeCountDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankGuaranteeCountDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankGuaranteeCount direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankGuaranteeCount error", e);
			return null;
		}
	}

	@Override
	public List<IntBankCreditPaymentRecordsDTO> saveMarvelsIntBankCreditPaymentRecord(
			IntBankCreditPaymentRecordsDTO intBankCreditPaymentRecord) {
		try {
			com.fintech.third.model.intbank.IntBankCreditPaymentRecords param = new com.fintech.third.model.intbank.IntBankCreditPaymentRecords();
			BeanUtil.copyProperties(intBankCreditPaymentRecord, param);
			List<com.fintech.third.model.intbank.IntBankCreditPaymentRecords> apiResult = intBankDataService.saveMarvelsIntBankCreditPaymentRecord(param);
			List<IntBankCreditPaymentRecordsDTO> result = JSONObject.parseArray(JSONObject.toJSONString(apiResult), IntBankCreditPaymentRecordsDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsIntBankCreditPaymentRecord direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsIntBankCreditPaymentRecord error", e);
			return null;
		}
	}

	@Override
	public IntBankBasiInfoCollectionDTO getMarvelsCreditReportData(Map<String, String> map) {
		try {
			com.fintech.third.model.intbank.IntBankBasiInfoCollection apiResult = intBankDataService.getMarvelsCreditReportData(map);
			IntBankBasiInfoCollectionDTO result = JSONObject.parseObject(JSONObject.toJSONString(apiResult), IntBankBasiInfoCollectionDTO.class);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.getMarvelsCreditReportData direct call success!");
			return result;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.getMarvelsCreditReportData error", e);
			return null;
		}
	}

	@Override
	public MarvelsResultDTO saveMarvelsCreditReport(String loanId) {
		try {
			MarvelsResultDTO marvelsResultDTO = intBankDataService.saveMarvelsCreditReport(loanId);
			MarvelsLogUtil.getInstance().info("ConsumerExternalIntBankApi.saveMarvelsCreditReport direct call success!");
			return marvelsResultDTO;
		} catch (Exception e) {
			MarvelsLogUtil.getInstance().error("ConsumerExternalIntBankApi.saveMarvelsCreditReport error", e);
			return null;
		}
	}

}
